import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Maybe {
    public static List<List<Integer>> yanghuisanjiao(int a) {
        List<List<Integer>> ret = new ArrayList<>();
        List<Integer> list = new ArrayList<>();
        //1.优先处理第一行
        list.add(1);
        ret.add(list);
        for (int i = 1; i < a; i++) {
            //1.处理每行的首项为1
            List<Integer> curRow = new ArrayList<>();
            curRow.add(1);
            //2.处理中间部分
            List<Integer> preRow=ret.get(i-1);
            for(int j=1;j<i;j++){
                int x=preRow.get(j)+ preRow.get(j-1);
                curRow.add(x);
            }
            //3.处理每行的末项为1
            curRow.add(1);
            //4.别忘记ret.add()
            ret.add(curRow);
        }
        return ret;
    }
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int a=scanner.nextInt();
        List<List<Integer>> ret=yanghuisanjiao(a);
        //使用foreach遍历二维数组
        for(List<Integer> row1:ret){
            for(Integer row2:row1){
                System.out.print(row2+" ");
            }
            System.out.println();
        }
    }
}
